<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII" />
<title>
  File: README
  
    &mdash; Documentation by YARD 0.8.3
  
</title>

  <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />

  <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  hasFrames = window.top.frames.main ? true : false;
  relpath = '';
  framesUrl = "frames.html#!" + escape(window.location.href);
</script>


  <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="js/app.js"></script>


  </head>
  <body>
    <div id="header">
      <div id="menu">
  
    <a href="_index.html">Index</a> &raquo; 
    <span class="title">File: README</span>
  

  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  
    <a class="full_list_link" id="class_list_link"
        href="class_list.html">
      Class List
    </a>
  
    <a class="full_list_link" id="method_list_link"
        href="method_list.html">
      Method List
    </a>
  
    <a class="full_list_link" id="file_list_link"
        href="file_list.html">
      File List
    </a>
  
</div>
      <div class="clear"></div>
    </div>

    <iframe id="search_frame"></iframe>

    <div id="content"><div id='filecontents'><h1>ViewModels</h1>
<p>A view model/representer solution for Padrino and Rails.</p>
<h2>Features</h2>
<ul>
	<li>Polymorph view model objects that correspond to model objects.</li>
	<li>View model specific templates.</li>
	<li>Hierarchical Template Rendering: Allows generalized templates for a class tree of view models.</li>
	<li>Helper methods directly on the view models.</li>
	<li>No view related code in the models.</li>
	<li>A clean <span class="caps">API</span> for use in Padrino/Rails.</li>
	<li>100% rcov coverage, nice metrics, gallons of blood and sweat by excellent contributors.</li>
</ul>
<h2>Installation</h2>
<h3>Padrino (via Gem)</h3>
<p>Note: The Padrino <span class="caps">API</span> might change as I get acquainted with the Padrino way of doing things. Basic calls like render_as without all its options will stay the same, and so will view_model_for.</p>
<p><code>gem install view_models</code></p>
<p>and then adding the line</p>
<p><code>gem 'view_models', '&gt;=2.0.0' # for example</code></p>
<p>in your Gemfile, followed by your app file(s):</p>
<pre class="code ruby"><code>require 'view_models'
...
class MyApplication &lt; Padrino::Application
  register Padrino::ViewModels
  ...
end
</code></pre>
<p>Note: Adheres to the Padrino style by explicitly registering.</p>
<h3>Rails (via Gem)</h3>
<p><code>gem install view_models</code></p>
<p>and then adding the line</p>
<p><code>config.gem 'view_models'</code></p>
<p>in your environment.rb.</p>
<h2>Links Galore!</h2>
<p><a href="http://wiki.github.com/floere/view_models/">Usage, Examples, In-depth Infos [Wiki]</a>
<a href="http://rdoc.info/projects/floere/view_models">Reference [RDoc]</a>
<a href="http://rubygems.org/gems/view_models">Gem [RubyGems.org]</a>
<a href="http://groups.google.com/group/view_models/topics">Mailing List</a>
<a href="http://github.com/floere/view_models/issues">Bug Tracker</a>
<a href="http://getcaliper.com/caliper/project?repo=git://github.com/floere/view_models.git">Metrics</a>
<a href="http://github.com/floere/view_models">Source [Github]</a>
<a href="http://floere.github.com/view_models/">Homepage</a></p></div></div>

    <div id="footer">
  Generated on Tue Oct 16 23:27:34 2012 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.8.3 (ruby-1.9.3).
</div>

  </body>
</html>